package com.reconcile.phone.common.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 虚拟拨号参数配置
 *
 * @author zxl
 * @version 2024/1/22
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "virtual-dialing")
public class VirtualDialingProperties implements InitializingBean {

  /**
   * accountId常量
   */
  public static String ACCOUNT_ID;
  /**
   * token常量
   */
  public static String TOKEN;

  /**
   * callbackUrl常量
   */
  public static String CALLBACK_URL;

  /**
   * accountId
   */
  private String accountId;

  /**
   * token
   */
  private String token;

  /**
   * 回调地址
   */
  private String callbackUrl;

  @Override
  public void afterPropertiesSet() {
    ACCOUNT_ID = this.accountId;
    TOKEN = this.token;
    CALLBACK_URL = this.callbackUrl;
  }


}
